package com.zhengaz.auth.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * @author zhengzg
 * @create 2023-09-11 16:39
 */
@Data
@ApiModel("登录表单")
public class LoginForm {

    @ApiModelProperty("用户名")
    @NotNull(message = "请填写账号")
    private String username;

    @ApiModelProperty("密码")
    @NotNull(message = "请填写密码")
    @Length(min = 10, max = 30, message = "密码长度大于10位，小于30位")
    private String password;

    @ApiModelProperty("登录类型")
    private String type;
}
